package com.kuang.springboot05mybaits.Service;

import com.kuang.springboot05mybaits.mapper.UserMapper;
import com.kuang.springboot05mybaits.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper mapper;

    @Override
    public List<User> queryUserList() {
        return mapper.queryUserList();
    }

    @Override
    public User queryUserById(int id) {
        return mapper.queryUserById(id);
    }

    @Override
    public int addUser(User user) {
        return mapper.addUser(user);
    }

    @Override
    public int updateUser(User user) {
        return mapper.addUser(user);
    }

    @Override
    public int delUserById(int id) {
        return mapper.delUserById(id);
    }
}
